package com.hospital.post.exception;

import com.hospital.common.exception.GlobalException;
import com.hospital.post.exception.enums.ExceptionCode;

/**
 * 自定义业务异常类
 */
public class ServiceException extends GlobalException
{

    public ServiceException(ExceptionCode exceptionCode){
        super(exceptionCode.getCode(), exceptionCode.getMessage());
    }

    public ServiceException(Integer code, String message){
        super(code, message);
    }

    public ServiceException(String message){
        super(ExceptionCode.BIZ_ERROR.getCode(), message);
    }

    public ServiceException(ExceptionCode exceptionCode, String message){
        super(exceptionCode.getCode(), message);
    }

}